package mzt;

import java.io.File;
import java.net.URL;
import java.net.URLConnection;

import org.apache.commons.io.FileUtils;

public class Demo2 {
	public static void main(String[] args) throws Exception {
		String picUrl = "http://i.meizitu.net/2018/03/30b01.jpg";
		URL url = new URL(picUrl);
		// 获得连接
		URLConnection connection = url.openConnection();
		connection.setRequestProperty("Referer", "http://www.mzitu.com/");
		FileUtils.copyURLToFile(url, new File("c://meizitu.jpg"));
		
		
		///////////////
		

	}
}
